public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        //System.out.println(root.val);

        binaryTree.preOrder(root);
        System.out.println("前");

        binaryTree.postOrder(root);
        System.out.println("中");

        binaryTree.postOrder(root);
        System.out.println("后");

        System.out.print("节点个数：");
        binaryTree.nodeSize(root);
        System.out.println( binaryTree.countNode);

        int leadSize = binaryTree.getLeafNodeCount(root);
        System.out.println("叶子节点个树："+leadSize);

        binaryTree.getLeafNodeCount2(root);
        System.out.println("叶子节点个数："+ binaryTree.leafNodeSize);

        int kLeveNodeSize = binaryTree.getKLeveNodeSize(root, 3);
        System.out.println("第k层叶子节点" + kLeveNodeSize);

        int n = binaryTree.getHeight(root);
        System.out.println("树的深度：" + n);

        BinaryTree.TreeNode  ret= binaryTree.find(root,'A');
        System.out.println("查找某个节点值："+ret.val);

        System.out.print("判断两棵二叉树是否相同：");
        System.out.println(binaryTree.isSameTree(root,root));
    }

}
